const routes = [
  {
    path: '/',
    redirect: '/home',
  },
  {
    path: '/',
    component: '@/layouts/BasicLayout',
    routes: [
      {
        name: '首页',
        path: '/home',
        component: './Home',
      },
      {
        name: '文章详情',
        path: '/view/:id',
        component: './View',
      },
      {
        name: '创作中心',
        path: '/creator',
        component: './Creator',
        permission:'isLogin'
      },
      {
        name: '消息中心',
        path: '/notice',
        component: './Notice',
        permission:'isLogin'
      },
      {
        name: '搜索',
        path: '/search',
        component: './Search',
      },
      {
        name: '个人主页',
        path: '/user/:id',
        component: './User',
        permission:'isLogin'
      }
    ],
  },
  {
    path: '/editor',
    component: './Editor',
    permission:'isLogin'
  },
];

export default routes;
